function generateCirclePosition(centerX, centerY, radius, minDistance, existingPositions = [], maxAttempts = 100) {
    let attempts = 0;
    
    // 如果没有已存在的位置，直接返回随机位置
    if (existingPositions.length === 0) {
      const angle = Math.random() * Math.PI * 2;
      return {
        x: centerX + radius * Math.cos(angle),
        y: centerY + radius * Math.sin(angle)
      };
    }
  
    // 尝试生成满足条件的位置
    while (attempts < maxAttempts) {
      const angle = Math.random() * Math.PI * 2;
      const newPos = {
        x: centerX + radius * Math.cos(angle),
        y: centerY + radius * Math.sin(angle)
      };
      
      // 检查与所有现有位置的距离
      let isValidPosition = true;
      for (const pos of existingPositions) {
        const dx = pos.x - newPos.x;
        const dy = pos.y - newPos.y;
        const distance = Math.sqrt(dx * dx + dy * dy);
        
        if (distance < minDistance) {
          isValidPosition = false;
          break;
        }
      }
      
      if (isValidPosition) {
        return newPos;
      }
      
      attempts++;
    }
    
    console.warn(`无法在 ${maxAttempts} 次尝试内找到满足条件的位置`);
    return null;
  }
  
  const center = { x: 45, y: 93 };
  const Closeradius = 25;
  const CloseminDistance = 10;
  // 近距离生成10个不重复的位置
  export const ClosePosition = [];
  for (let i = 0; i < 10; i++) {
    const pos = generateCirclePosition(center.x, center.y, Closeradius, CloseminDistance, ClosePosition);
    if (pos) {
      ClosePosition.push(pos);
    } 
  }
  const Farradius = 42;
  const FarminDistance = 13;
  // 远距离生成15个不重复的位置
  export const FarPosition = [];
  for (let i = 0; i < 15; i++) {
    const pos = generateCirclePosition(center.x, center.y, Farradius, FarminDistance, FarPosition);
    if (pos) {
      FarPosition.push(pos);
    } 
  }
